package com.example.groupmeal.utils;

public class Result<T> {

    private int error_code;
    private String error_msg;
    private T data;

    public Result() {
    	
    }

    public Result(ResultCode resultCode, T data) {
        this(resultCode);
        this.data = data;
    }

    public Result(ResultCode resultCode) {
        this.error_code = resultCode.getError_code();
        this.error_msg = resultCode.getError_msg();
    }

    public int getError_code() {
		return error_code;
	}

	public void setError_code(int error_code) {
		this.error_code = error_code;
	}

	public String getError_msg() {
		return error_msg;
	}

	public void setError_msg(String error_msg) {
		this.error_msg = error_msg;
	}

	public Object getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
